while loop with if else

29

c=0
while c < 10:
    if c!=5:
        print(c)
    else:
        print("FIVE")
    c+=1
while c < 10: c+=1; print(c) if c!=5 else print("FIVE")

Comments

Submit
0 Comments